<%@ page import="org.f0rb.demo.common.Message" %>
<%--@elvariable id="login_user" type="org.f0rb.demo.model.user.User"--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page pageEncoding="UTF-8" %>
<!DOCTYPE HTML>
<html lang=zh-CN>
<head>
    <meta charset="utf-8">
    <title>欢迎访问login-demo项目主页</title>
    <link href="<c:url value="/resources/css/global.css"/>" rel="stylesheet">
    <jsp:include page="/WEB-INF/jsp/head/jquery.jsp"/>
    <jsp:include page="/WEB-INF/jsp/head/fixie.jsp"/>
    <script src="<c:url value='/resources/js/e2s.js?v=20120421'/>" type="text/javascript"></script>
</head>
<body>
<h1>Hello, this is a demo of S2SH!</h1>
<div>
    <c:choose>
        <c:when test='${login_user == null}'>
            <p>
                <a href="user/login"><%=Message.USER_LOGIN%></a>
                <a href="user/register"><%=Message.USER_REGISTER%></a>
            </p>
        </c:when>
        <c:otherwise>
            <p>
                <%=Message.USER_WELCOME%>
                <a href="javascript:">${login_user.nickname}</a> !
                <a href="javascript:e2s('${sessionScope.login_user.username}');"><%=Message.GOTO$EMAIL%></a>
                <a href="user/index"><%=Message.INDEX_TITLE%></a>
                <a href="user/logout"><%=Message.USER_LOGOUT%></a>
            </p>
        </c:otherwise>
    </c:choose>
</div>
<jsp:include page="/WEB-INF/jsp/common/footer.jsp"/>
</body>
</html>
